<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>上传图片</title>
		<#include '/frame/version.html'>
		<#include '/frame/manage/include_css.html'>
		<#include '/frame/manage/include_js.html'>
		<#include '/frame/taglib.html'>
	</head>
	<body style="background: #fff">
		<form  action="${base}/anon/material/image" enctype="multipart/form-data" method="post" style="font-size: 14px; padding: 30px 20px 10px 20px;">
			<p id="picsize" style="margin-bottom: 20px">
				<span style="color: #930; font-size: 14px; margin-bottom: 20px;">图片最佳尺寸：宽400px 高300px</span>
			</p>
			<div style="font-size: 14px;">
				选择本地文件：<br>
				<br>
				<input type="file" style="width: 90%; border: 1px solid #ddd" name="picture" accept="image/*">
				<input type="hidden" name="useThumb" value="${useThumb?default(0)}">
				<input type="hidden" name="w" value="${w?default(0)}">
				<input type="hidden" name="h" value="${h?default(0)}">
				<input type="hidden" name="n" value="${n?default('temp')}">
			</div>
			<div style="padding: 50px 50px; text-align: right;">
				<input id="submitbtn" name="doSubmit" type="submit" class="btnGreen" value="上传" onclick="return checkForm(this);">
			</div>
			<p></p>
		</form>
		<script type="text/javascript">
			function checkForm(ele){
				var $file = $(":file");
				if($file.val()==""){
					$file.focus();
					layer.alert("请选择文件",{icon:1});
					return false;
				}
				ele.value='上传中...';
				return true;
			}
		</script>
	</body>
</html>